package dto

import (
	"github.com/e421083458/go_gateway_demo/public"
	"github.com/gin-gonic/gin"
	"time"
)

type AdminSessionInfo struct {
	ID        int       `json:"id"`
	UserName  string    `json:"user_name"`
	LoginTime time.Time `json:"login_time"`
}

type AdminInput struct {
	UserName	string	`json:"username" form:"username" comment:"用户名" example:"admin" validate:"required,valid_username"`//用户名
	Password	string	`json:"password" form:"password" comment:"密码" example:"123456" validate:"required"`//密码
}

type AdminOutput struct {
	Token	string	`json:"token" form:"token" comment:"token" example:"token" validate:""`//token
}

func (param *AdminInput) BindValidParam(c *gin.Context) error {
	return public.DefaultGetValidParams(c, param)
}